package com.yonyou.pmclouds.alterandvisa.process;

import com.yonyou.pmclouds.alterandvisa.entity.AlterAndVisaVO;
import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;

public class AlterAndVisaInsertCheckProcessor implements SingleProcessor<AlterAndVisaVO> {

    @Override
    public void process(AlterAndVisaVO vo, AlterAndVisaVO orig) throws BusinessException {
        if(vo == null){
            throw new BusinessException("单据不能为空！");
        }
        if(vo.getIsVisa() == null){
            throw new BusinessException("变更签证类型不能为空！");
        }
        if(vo.getApplyDate() == null){
            throw new BusinessException("申请日期不能为空！");
        }
        if(vo.getPkEnterprise() == null){
            throw new BusinessException("施工单位不能为空！");
        }
    }
}
